<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="org.myname.example1.pojo.DatePropertyEdit" %>    
<%@ page import="java.beans.PropertyEditorManager" %>    
<%@ page import="java.beans.PropertyEditor" %>    
<%@ page import="java.util.*" %>    
<%!
    public void jspInit(){
	PropertyEditor editor=PropertyEditorManager.findEditor(Date.class);
	if(editor==null){
		PropertyEditorManager.registerEditor(Date.class,DatePropertyEdit.class);
	}
}
%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="message1" class="org.myname.example1.pojo.Message"></jsp:useBean>
<jsp:setProperty property="from" name="message1" value="lla"/>
<jsp:setProperty property="to" name="message1" value="sdas"/>
<jsp:setProperty property="msgDate" name="message1" value="2016-9-22 10:42:54"/>
<p>
<jsp:getProperty property="from" name="message1"/><br/>
<jsp:getProperty property="to" name="message1"/><br/>
<jsp:getProperty property="msgDate" name="message1"/><br/>
</p>
</body>
</html>